﻿/***********************************************************************
 * Module:  CPFObject.h
 * Author:  ZHANGHASI
 * Modified: 2020年12月7日 下午 3:50:21
 * Purpose: Declaration of the class CPFObject
 ***********************************************************************/

#ifndef __CPFOBJECT_H__
#define __CPFOBJECT_H__

#include <iostream>
#include <string.h>
#include <list>
#include <vector>
#include <algorithm>
#include <mutex>
#include <typeinfo>

#include "CPF/CPF.h"


using namespace std;

#ifdef LINUX_OS

#include <hash_map>

namespace __gnu_cxx {
    template<>
    struct hash<std::string>
    {
        hash<char*> h;
        size_t operator()(const std::string &s) const
        {
            return h(s.c_str());
        };
    };
}

using namespace __gnu_cxx;

#else

#ifndef _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS

#include <unordered_map>

#else

#include <hash_map>

#endif

#endif

/**
 * \class   CPFObject
 *
 * \brief   插件基础类.
 *
 * \author  zhanghs
 * \date    2020/12/8
 */
class CPF_EXPORT CPFObject
{
public:

    /**
     * \fn  CPFObject::CPFObject();
     *
     * \brief   构造函数.
     *
     * \author  zhanghs
     * \date    2020/12/8
     */
    CPFObject();

    /**
     * \fn  virtual CPFObject::~CPFObject();
     *
     * \brief   析构函数.
     *
     * \author  zhanghs
     * \date    2020/12/8
     */
    virtual ~CPFObject();

protected:

private:

};

// 定义返回创建对象函
typedef CPFObject* (*CPF_PLUGIN_FUNCTION_INSTANCE)();


#endif // __CPFOBJECT_H__

